home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 97 / CD-ROM 97 / CD-ROM 97.iso / jogos / spherical / Code / Library / linked_lists.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-06-29  |  821 b   |  34 lines

  1.  
  2. // Copyright (C) 2002 by Luigi Pino.  All Rights Reserved.
  3.  
  4. /***************************************************************************/
  5.  
  6. struct node {
  7.     int            value;
  8.     struct    node    *next;
  9.     struct    node    *previous;
  10. };
  11.  
  12. /***************************************************************************/
  13.  
  14. class Linked_Lists_Class {
  15.     public:
  16.         Linked_Lists_Class();                                                            // Constructor
  17.         ~Linked_Lists_Class();                                                        // Deconstructor
  18.  
  19.         void    Add_Item();
  20.         void    Delete_Item();
  21.         void    Delete_List();
  22.         int        Get_First_Value();
  23.         int        Get_Value();
  24.         void    Initialize_List();
  25.         void    Next_Item();
  26.         void    Previous_Item();
  27.         void    Set_Value(int value);
  28.  
  29.     private:
  30.         struct node    *first_item;
  31.         struct node    *list;
  32. };
  33.  
  34. /***************************************************************************/